package utils;

import java.sql.Date;

public class User {
    
    public enum UserType{
        DOCTOR,
        PATIENT
    }
    
    int id;
    String name;
    String surname;
    String username;
    String password;
    UserType type;
    
    String photo;
    Date birthdate;
    int isRegistered;
    
    public User(int id, String name, String surname, String username, String password, String typeUser, String photo, Date birthdate, int isRegistered){
        this.id = id;
        this.name = name;
        this.surname = surname;
        this.username = username;
        this.password = password;
        this.birthdate = birthdate;
        this.isRegistered = isRegistered;
        this.photo = photo;
        
        if(typeUser.equals("doctors")) {
            type = UserType.DOCTOR;
        } else {
            type = UserType.PATIENT;
        }
        
    }
    
    public User(int id, String name, String surname, String username, String password, String photo, Date birthdate){
        this.id = id;
        this.name = name;
        this.surname = surname;
        this.username = username;
        this.password = password;
        this.birthdate = birthdate;
        this.photo = photo;
        
    }
    

    
    public int getId(){return id;}
    public String getName(){return name;}
    public String getSurname(){return surname;}
    public String getUsername(){return username;}
    public String getPassword(){return password;}
    public UserType getUserType(){return type;}
    
    public String getPhoto(){return photo;}
    public int isRegistered(){return isRegistered;}
    public Date getBirthdate(){return birthdate;}
}
